import Cookies from 'js-cookie';

/**
 * @description 清除所有cookie
 * @param {*} options 
 */
export const clearAllCookies = (options = { path: '/' })  => {
  const cookies = Cookies.get();
  Object.keys(cookies).forEach(name => {
    Cookies.remove(name, options);
  });
}

/**
 * @description 退出登录
 */
export const loginOut = () => {
  Cookies.remove('ut');
  Cookies.remove('un');
}